@import "./common.less";
//根据申菱UI样式 重写对应antd组件的样式
#root {
  .sl-header {
    height: 56px;
    line-height: 1;
    padding: 0 16px 0;
    box-shadow: rgba(17, 68, 117, 0.08) 0 2px 8px 0;
    position: relative;
    z-index: 10;
  }
  .sl-menu {
    border: 0;
    .ant-menu-item {
      width: auto;
    }
    .ant-menu-submenu-title {
      width: auto;
      padding-right: 16px;
      .anticon:last-child {
        min-width: 14px;
        font-size: 14px;
      }
    }
    .ant-menu-submenu-selected > .ant-menu-submenu-title,
    .ant-menu-submenu-active .ant-menu-submenu-title {
      color: @color-main;
      .ant-menu-item-icon {
        color: @color-main;
      }
      .anticon-up,
      .anticon-down {
        color: @color-secondary;
      }
    }
    .ant-menu-item-selected > .ant-menu-title-content a{
      font-weight: bolder;
    }
    
    .ant-menu-sub > .ant-menu-item {
      //16 + 24 + 10
      padding-left: 50px !important;
    }
  }
  .sl-menu.ant-menu-inline-collapsed {
    .ant-menu-item,
    .ant-menu-submenu-title {
      //40是ant-layout-sider 收缩的时候的宽度
      //(40 - 24) / 2
      padding: 0 8px;
      > .ant-menu-item-icon {
        font-size: 24px;
      }
    }
  }

  .sl-dropdown-menu {
    .ant-menu-item{
      display: flex;
      flex-direction: row;
      align-items: center;
    }
    .ant-menu-item-icon {
      min-width: 20px;
      font-size: 20px;
      color: @color-secondary;
    }
    .ant-menu-title-content{
      font-size: 14px;
      font-weight: bolder;
    }
    .ant-menu-item-active, .ant-menu-item-selected{
      .ant-menu-item-icon{
        color: @active-color-1;
      }
    }
  }
  //table
  .ant-table-wrapper {
    .ant-table-thead > tr > th::before {
      display: none;
    }
    .ant-table-selection-column{
      padding-right: 0;
      padding-left: 16px;
    }
  }
  .ant-table-wrapper:not(.no-pagination) {
    .ant-table {
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }
  }
  //第一列左边padding为0
  // .col1-pl-0{
  //   .ant-table-thead tr th:first-child{
  //     padding-left: 0;
  //   }
  //   .ant-table-row td:first-child{
  //     padding-left: 0;
  //   }
  // }

  .ant-table-empty-noborder {
    .ant-table-placeholder {
      .ant-table-cell {
        border: 0;
      }
    }
  }
  .ant-table-thead > tr > th {
    font-weight: 600;
  }
  .sl-table-empty {
    .ant-table-container table {
      height: 100%;
      .ant-table-cell {
        border: 0;
      }
    }
    .ant-table-body{
      border-top: 1px solid #f0f0f0;
    }
  }
  .ant-table-small{
    .sl-empty-icon {
      font-size: 80px;
    }
    .sl-empty-text {
      font-size: 12px;
    }
  }
  //mini pagination
  .ant-pagination.mini {
    height: 60px;
    margin: 0;
    background-color: #fff;
    padding: 0 16px;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
  }
  .mini {
    .ant-pagination-prev {
      & + .ant-pagination-item {
        margin-left: 5px;
      }
    }
    .ant-pagination-item-link {
      font-size: 16px;
      color: @color-secondary;
    }
    .ant-pagination-disabled {
      .ant-pagination-item-link {
        color: @color-disabled;
      }
    }
    .ant-pagination-item {
      margin-right: 5px;
      a {
        color: @color-secondary;
      }
    }
    .ant-pagination-item-active {
      background-color: #4285f4;
      a {
        color: #fff;
      }
    }
    .ant-pagination-options {
      margin-left: 18px;
    }
    .ant-pagination-total-text {
      flex: 1 1 0;
      color: @color-secondary;
    }
  }
  .sl-pagination-px0 {
    .ant-pagination {
      padding-left: 0;
      padding-right: 0;
    }
  }
  .ant-list-pagination{
    margin: 0;
    text-align: left;
    .ant-pagination{
      padding: 0;
    }
  }
  //drawer
  .sl-inside-drawer {
    .ant-drawer-header {
      display: block;
    }
    .ant-drawer-header-title {
      flex-direction: row-reverse;
    }
    .ant-drawer-title {
      flex: 1 1 0%;
      font-weight: 600;
    }
    .ant-drawer-close {
      margin-right: 0;
    }
  }
  .sl-drawer {
    .ant-drawer-footer {
      padding: 0 24px 24px;
      border-top: 0;
    }
  }
  //cascader-menus
  .sl-cascader-menus {
    .ant-cascader-menu {
      height: 250px;
    }
  }
  //tag
  .sl-tag {
    border-radius: 4px;
    border: 0;
    line-height: 22px;
    margin: 0;
    font-size: 14px;
  }
  .sl-tag.ant-tag-green {
    background-color: fade(@color-success, 10);
    color: @color-success;
  }
  .sl-tag.ant-tag-red {
    background-color: fade(@color-danger, 10);
    color: @color-danger;
  }
  //dialog
  .sl-dialog {
    .ant-modal-footer {
      padding: 24px;
      padding-top: 0;
      border-top: 0;
      .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
        margin-left: 16px;
      }
    }
  }
  //modal
  .ant-modal-confirm .ant-modal-confirm-btns .ant-btn + .ant-btn {
    margin-left: 16px;
  }
  .ant-modal-title {
    font-weight: 600;
  }
  //upload
  .ant-upload.ant-upload-select-picture-card {
    width: auto;
    height: auto;
  }
  //对Modal[method]的弹框样式覆盖
  .sl-info-modal {
    .ant-modal-body {
      padding-top: 0;
      padding-left: 0;
      padding-right: 0;
    }
    .ant-modal-confirm-body>.anticon {
      float: none;
      position: absolute;
      top: 50%;
      left: 24px;
      transform: translateY(-50%);
      font-size: 32px;
      margin-top: -3px;
    }
    .ant-modal-confirm-title {
      padding: 16px 24px;
      border-bottom: 1px solid #f2f3f4;
    }
    .ant-modal-confirm-content {
      padding: 0 24px 0 32px;
      margin-top: 28px;
      font-size: 16px;
    }
    .ant-modal-confirm-btns {
      padding-right: 24px;
      margin-top: 28px;
      .ant-btn {
        padding-left: 24px;
        padding-right: 24px;
      }
    }
  }
  //select tree
  .ant-select-tree {
    .ant-select-tree-treenode {
      &:hover {
        background-color: #f5f5f5;
      }
      padding-bottom: 0;
      background-color: #ffffff;
      transition: background-color 0.3s;
    }
    .ant-select-tree-treenode-selected {
      background-color: #e8f4ff !important;
    }
    .ant-select-tree-switcher {
      line-height: @sl-height-base;
    }
    .ant-select-tree-node-content-wrapper {
      line-height: @sl-height-base;
      transition: none;
      &:hover {
        background: none;
      }
    }
  }
  //tree
  .ant-tree {
    .anticon-caret-down {
      color: #7b879a;
    }
  }
  //small
  .ant-radio-group-small{
    .ant-radio-button-wrapper{
      font-size: 12px;
    }
  }
  .ant-picker-small{
    height: 30px;
    .ant-picker-input{
      input {
        font-size: 12px;
      }
    }
  }
  .ant-picker-small.ant-picker-range{
    height: 28px;
  }
  .ant-select-sm{
    .ant-select-selection-item{
      font-size: 14px;
    }
  }
  .dropdown-sm{
    .ant-select-item{
      min-height: 30px;
      font-size: 12px;
      padding:0 7px;
      line-height: 30px;
    }
  }
  .ant-select-arrow{
    width: 14px;
    height: 14px;
    color: @color-secondary;
  }
  .sl-upload{
    .ant-upload-list-picture-card-container{
      -webkit-animation-duration: 0s;
      animation-duration: 0s;
      -webkit-animation-fill-mode: none;
      animation-fill-mode: none;
      -webkit-animation-name: none;
      animation-name: none;
      height: auto !important;
    }
    .ant-upload-animate-inline{
      display: none;
    }
  }
  //tabs
  .sl-tabs{
    .ant-tabs-tab-btn{
      color: @color-secondary;
    }
    .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{
      color: @active-color-1;
    }
    .ant-tabs-tab-active{
      .ant-badge-count{
        background-color: @active-color-1 !important;
        color: #fff !important;
        box-shadow: 0 0 0 1px @active-color-1 inset !important;
      }
    }
  }
  .sl-tabs-fit{
    height: 100%;
    .ant-tabs-content-holder{
      overflow: auto;
    }
  }
  .ant-steps-item-title{
    line-height: 32px;
  }
  //button
  //按钮图标文字垂直居中
  .icon-text-middle{
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    .anticon.text-xl{
      font-size: 0;
      >svg{
        font-size: 18px;
      }
    }
    .anticon.text-lg{
      font-size: 0;
      >svg{
        font-size: 16px;
      }
    }
    .anticon.text-2xl{
      font-size: 0;
      >svg{
        font-size: 20px;
      }
    }
  }
}
.sl-status {
  .ant-result-icon {
    // margin-bottom: 30px;
    > .anticon {
      font-size: 100px;
    }
  }
}

@media (max-width: 370px) {
  .ant-pagination-total-text {
    display: none !important;
  }
}

//应用于a-image的父容器 使图片居中
.a-image-center{
  .ant-image {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.ant-form-label-mark::before{
  display: inline-block;
  margin-right: 4px;
  color: #ff4d4f;
  font-size: 14px;
  font-family: SimSun, sans-serif;
  line-height: 1;
  content: '*';
}